package org.dtrd.modules.record.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.config.system.Constant;

/**
 * @author 萧
 * @date:2021-08-22 3:51 下午
 **/
@Data
@ApiModel(value = "打卡记录", description = "打卡记录")
public class CheckinRecord {

    private Integer patientId;

    /**
     * 记录ID
     */
    @ApiModelProperty(value = "记录ID")
    private Integer dataId;

    /**
     * @see org.dtrd.config.system.Constant.RecordType
     */
    @ApiModelProperty(value = "打卡记录类型")
    private Integer recordType;

    /**
     * @see Constant.SugarRecordType
     * @see org.dtrd.config.system.Constant.InsulinRecordType
     * @see org.dtrd.config.system.Constant.MedicalRecordType
     * @see org.dtrd.config.system.Constant.FoodRecordType
     * @see org.dtrd.config.system.Constant.BloodPressureRecordType
     */
    @ApiModelProperty(value = "打卡记录子类型")
    private Integer subType;

    @ApiModelProperty(value = "打卡记录类型名称")
    private String recordTypeName;

    /**
     * 上传图片地址，以逗号拼接
     */
    @ApiModelProperty(value = "上传图片地址，以逗号拼接")
    private String images;

    /**
     * 记录时间
     */
    @ApiModelProperty(name = "记录时间name", value = "记录时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2021-08-22 22:44:00")
    private String recordTime;

    /**
     * 记录时间HH:MM
     */
    @ApiModelProperty(name = "记录时间", value = "记录时间", notes = "HH:mm", example = "22:44")
    private String recordTimeHm;

    /**
     * 记录日期
     */
    @ApiModelProperty(name = "记录日期", value = "记录日期", notes = "yyyy-MM-dd", example = "2021-08-22")
    private String recordDate;

    /**
     * 血糖值
     */
    @ApiModelProperty(value = "血糖值")
    private Float sugarValue;


    /**
     * 饮食类型
     */
    @ApiModelProperty(value = "饮食类型")
    private Integer foodType;

    /**
     * 饮食类型名称
     */
    @ApiModelProperty(value = "饮食类型名称")
    private String foodTypeName;

    /**
     * 运动步数
     */
    @ApiModelProperty(value = "运动步数")
    private Integer sportValue;

    /**
     * 运动类型
     * 如快走、慢跑等
     */
    @ApiModelProperty(value = "运动类型")
    private Integer sportType;

    /**
     * 力量运动描述
     */
    @ApiModelProperty(value = "力量运动描述")
    private String sportPowerDesc;

    /**
     * 体重
     */
    @ApiModelProperty(value = "体重")
    private Float weight;

    /**
     * 血压高压/收缩压
     */
    @ApiModelProperty(value = "血压高压/收缩压")
    private Integer highPressure;

    /**
     * 血压低压/舒张压
     */
    @ApiModelProperty(value = "血压低压/舒张压")
    private Integer lowPressure;

    /**
     * 心率
     */
    @ApiModelProperty(value = "心率")
    private Integer heartPulse;

    /**
     * 腰围
     */
    @ApiModelProperty(value = "腰围")
    private Integer waist;

    /**
     * 尿酮
     */
    @ApiModelProperty(value = "尿酮")
    private Integer ketone;
    /**
     * 尿酮描述
     */
    @ApiModelProperty(value = "尿酮描述")
    private String ketoneDesc;

    /**
     * 用药描述
     */
    @ApiModelProperty(value = "用药描述")
    private String medicalDesc;

    @ApiModelProperty("服用药品描述")
    private String medicalRecordDescribe;

    @ApiModelProperty("1-遵嘱用药,2-漏用药,3-自停药")
    private Integer medicalRecordStatus;

    /**
     * 睡眠类型
     */
    @ApiModelProperty(value = "睡眠类型, 睡眠状况, 1-正常, 2-早睡,3-晚睡,4-失眠")
    private Integer sleep;
    /**
     * 睡眠表述
     */
    @ApiModelProperty(value = "睡眠描述")
    private String sleepDesc;

    /**
     * 营养素描述
     */
    @ApiModelProperty(value = "营养素描述")
    private String nutrientDesc;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "注射情况", notes = "1-遵嘱注射 2-漏注射 3-自停打")
    private Integer injection;

    @ApiModelProperty("胰岛素用量")
    private String insulinDescribe;

    @ApiModelProperty(value = "饮食描述")
    private String foodRecordDesc;

    @ApiModelProperty(value = "记录值", hidden = true)
    private String recordValue;

    @ApiModelProperty(value = "记录值，如血压低压", hidden = true)
    private String recordValue2;

    @ApiModelProperty(value = "记录值，如血压心率", hidden = true)
    private String recordValue3;

    @ApiModelProperty(value = "记录描述", hidden = true)
    private String recordDesc;


    public static final class RecordBuilder {
        private CheckinRecord checkinRecord;

        private RecordBuilder() {
            checkinRecord = new CheckinRecord();
        }

        public static RecordBuilder singleInstance() {
            return new RecordBuilder();
        }

        public RecordBuilder withPatientId(Integer patientId) {
            checkinRecord.setPatientId(patientId);
            return this;
        }

        public RecordBuilder withDataId(Integer dataId) {
            checkinRecord.setDataId(dataId);
            return this;
        }

        public RecordBuilder withRecordType(Integer recordType) {
            checkinRecord.setRecordType(recordType);
            return this;
        }

        public RecordBuilder withSubType(Integer subType) {
            checkinRecord.setSubType(subType);
            return this;
        }

        public RecordBuilder withImages(String images) {
            checkinRecord.setImages(images);
            return this;
        }

        public RecordBuilder withRecordTime(String recordTime) {
            checkinRecord.setRecordTime(recordTime);
            return this;
        }

        public RecordBuilder withRecordDate(String recordDate) {
            checkinRecord.setRecordDate(recordDate);
            return this;
        }

        public RecordBuilder withRemark(String remark) {
            checkinRecord.setRemark(remark);
            return this;
        }

        public RecordBuilder withRecordValue(String recordValue) {
            checkinRecord.setRecordValue(recordValue);
            return this;
        }

        public RecordBuilder withRecordValue2(String recordValue2) {
            checkinRecord.setRecordValue2(recordValue2);
            return this;
        }

        public RecordBuilder withRecordValue3(String recordValue3) {
            checkinRecord.setRecordValue3(recordValue3);
            return this;
        }

        public RecordBuilder withRecordDesc(String recordDesc) {
            checkinRecord.setRecordDesc(recordDesc);
            return this;
        }

        public CheckinRecord build() {
            return checkinRecord;
        }
    }
}
